# -*- coding: utf-8 -*-
"""
Module Description:
"""
from framework.dal.datasource import BaseDatasourceCharacterModel

from framework.dal.orm import models


class BaseChaosModel(BaseDatasourceCharacterModel, models.Model):
    """
    Chaos ORM模型基类
    """

    def save(self):
        with self.get_datasource():
            return models.Model.save(self)

    def delete(self):
        with self.get_datasource():
            return models.Model.delete(self)
